#ifndef __DRAW_TOOL_H__
#define __DRAW_TOOL_H__

#include "StructDef.h"
#include "Graphic/Graphic.h"
#include "ImageDef.h"
#ifdef __cplusplus
extern "C" {
#endif

// Warning: plz prefer to define these in 'makexx' instead here -OB

#ifndef __DOUBLE_SCREEN__
// Set to enable the double screen feature
#define __DOUBLE_SCREEN__		0
#endif

#ifndef SCREEN_WIDTH
// Set these screen dimension as default

#define	BF54X_UPGRADE

  #ifndef BF54X_UPGRADE

	#define SCREEN_WIDTH		720
	#define SCREEN_HEIGHT		480
	#else
	#define SCREEN_WIDTH		600
	#define SCREEN_HEIGHT		360
	#endif
	

#endif	// SCREEN_WIDTH

extern TCanvas		_Offscreen;

extern TText		_Text16;
extern TText		_Text33;
extern TText		_Text18;

#define OFFSCREEN	(&_Offscreen)

#define FONT12	(&_Text16)
#define FONT13	(&_Text16)
#define FONT14	(&_Text16)
#define FONT16	(&_Text16)
#define FONT18	(&_Text18)
#define FONT33	(&_Text33)

extern int			RGB_WHITE;
extern int			RGB_BLACK;
extern int			RGB_RED;
extern int			RGB_GREEN;
extern int			RGB_BLUE;
extern int			RGB_YELLOW;
extern int			RGB_MAGENTA;
extern int			RGB_GRAY;

BOOL	dt_Initialize();
void	dt_Present();
void	dt_Present_part(TRect rect);//hangsheng 20080131 add


TImage*	dt_GetImagePtr(int no);

BOOL dt_PutsPathEng(const TCanvas *canvas, const TText *text, TPoint* points, int count, const char *str);

void dt_PutsPathChinese(const TCanvas *canvas, const TText *text, TPoint* points, int count, const char *str);

void dt_EnableAntiAlaised(int enable);

void dt_SetScreenClip( TRect rect, BOOL bWrite );

TRect dt_GetScreenClip();

int	dt_GetScreenClipWidth();

int	dt_GetScreenClipHeight();

BOOL dt_ClipTouchGetXY( int *x, int *y);

#ifdef __cplusplus
}
#endif

#endif
